package v1.chapter12.eventTracer;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JSlider;

public class EventTracerTest {

	public static void main(String[] args) {
		EventQueue.invokeLater(() -> {
			JFrame frame = new EventTracerFrame();
			frame.setTitle("EventTracerTest");
			frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
			frame.setVisible(true);
		});
	}
}

class EventTracerFrame extends JFrame {
	public EventTracerFrame() {
		add(new JSlider(), BorderLayout.NORTH);
		add(new JButton("Test"), BorderLayout.SOUTH);

		EventTracer tracer = new EventTracer();
		tracer.add(this);
		pack();
	}
}